/**
 * 工厂模式
 */

class Student {
    private name: string;
    private sex: boolean;
    private age: number;

    constructor(name: string, sex:boolean, age: number) {
        this.name = name
        this.sex = sex
        this.age = age
    }

    consoleStudentInfo () {
        console.log('用户信息：'+ this.name + ' ; ' + this.sex + ' ; ' + this.age);
    }
}

const student1 = new Student('张三', true, 20)
student1.consoleStudentInfo()

const student2 = new Student('李四', false, 21)
student2.consoleStudentInfo()